<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/3
 * Time: 16:05
 */
namespace Api\Controller;

use Think\Controller;

class ManJianController extends Controller
{
      public function getManJian(){
          //查询所有的满减信息
          $result = M("PromotionManjian")->field('id,name,price,start_time,end_time,condition_price')->select();

          if ($result) {
              $this->ajaxReturn(array('state' => 1, 'data' => $result,'message' => 'ok'), 'json');
          } else {
              $this->ajaxReturn(array('state' => -1,'message' => '获取失败'), 'json');
          }
      }
}